<%@ page language="java"  pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="<s:url value="/style.css"/>" rel="stylesheet"
	type="text/css" />
<style>
	#drugTable td {
		text-align:center;
	}
</style>
<title>Drug List</title>
</head>
<body>
<jsp:include page="/navigation/navigation.jsp" />

	<center>
		<h3>Drug List</h3>
		<table id="drugTable">
			<col width="100" />
			<col width="100" />
			<col width="80" />
			<col width="80" />
			<thead>
				<tr>
					<th>Id</th>
					<th>Name</th>
					<th>Type</th>
					<th>Edit</th>
				</tr>
			</thead>
			<tbody>
				<s:iterator value="retrievedDrugList">
					<tr>
						<td><s:property value="drugId"/></td>
						<td><s:property value="drugName"/></td>
						<td><s:property value="%{DrugTypeMap[type]}"/></td>
						<td><a href="<s:url action='initUpdateDrugPage'><s:param name="selectedDrugId" value="%{drugId}" /></s:url>">edit</a></td>
					</tr>
				</s:iterator>
			</tbody>
		</table>
	</center>
	
</body>
</html>